package bootstrap

import (
	"fmt"

	"github.com/runningwater/gohub/pkg/config"
	"github.com/runningwater/gohub/pkg/redis"
)

// SetupRedis 初始化 Redis
func SetupRedis() {

	// 连接 Redis
	redis.ConnectRedis(
		fmt.Sprintf("%s:%s", config.Get("redis.host"), config.Get("redis.port")),
		"", // redis.username 为空
		config.GetString("redis.password"),
		config.GetInt("redis.database"),
	)
}
